{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}

{% block title %}FastApp - 文章列表{% endblock %}

{% block page_content %}
<div class="page-header">
    <h1>查看- {{ app_name }} -下的文章</h1>
<!--    <a class="btn btn-primary" href="/addProduct?category_id={{ category_id }}&category_name={{ category_name }}">新建文章</a> -->
    <a class="btn btn-primary" href="/editpost"> 新建文章</a>
</div>
{% for product in products %}
		<div class="product-cell">
			<img src="{{ product.get('image') }}" height="40" width="40" class="product-img">
			<div class="product-title">
				{{ product.get('title') }}
			</div>
			<div class="product-title">
				{{ moment(product.get('createdAt')).fromNow(refresh=True)  }}
			</div>
			<div class="product-introduce">
				{{ product.get('content') | striptags }}
			</div>
		</div>
	{% endfor %}

{% endblock %}